package com.training2.bookstore.product.repo;


import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.training2.bookstore.product.model.Product;


public interface ProductRepository extends JpaRepository<Product, String >{
	public List<Product> findByNameLike(String name);//select * from Product where name = ...
	public List<Product> findByNameLikeOrDescLike(String name, String desc);//select * from Product where name = ...
	public List<Product> findByQuantityGreaterThan(int quantity);
	public List<Product> findByQuantityGreaterThanAndQuantityLessThan(int q1, int q2);

}
